package com.internetCafes.spms.web.certificate.service;

import com.internetCafes.spms.core.model.pageModel.DataGrid;
import com.internetCafes.spms.web.certificate.entity.CertificateRenewalInfo;

import java.util.List;
import java.util.Map;

/**
 * 证书延期信息
 * 
 * @author Sunny
 */
public interface CertificateRenewalInfoService {

    /**
     * 通过证书id进行删除遗留数据
     *
     * @param certificateId 证书id
     * @return 删除
     */
    Boolean deleteByCertificateId(Long certificateId);

    /**
     * 查询
     */
    List<CertificateRenewalInfo> query(Map<String, Object> params);

    /**
     * ID查询
     */
    CertificateRenewalInfo findById(Long id);

    /**
     * ID批量查询
     */
    List<CertificateRenewalInfo> queryByIds(List<Long> ids);

    /**
     * 参数分页查询
     */
    List<CertificateRenewalInfo> page(Map<String, Object> params, int page, int rows);

    /**
     * 参数查询总数
     */
    long count(Map<String, Object> params);

    /**
     * First查询
     */
    CertificateRenewalInfo findFirst(Map<String, Object> params);

    /**
     * 保存
     */
    int save(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 批量保存
     */
    int saveBatch(List<CertificateRenewalInfo> certificateRenewalInfoList);

    /**
     * 选择保存
     */
    int saveSelective(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 修改
     */
    int update(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 选择修改
     */
    int updateSelective(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 删除
     */
    int delete(Long id);

    /**
     * 批量删除
     */
    int deleteBatch(List<Long> ids);

    /**
     * 批量删除
     */
    void deleteBatch(Long[] ids);


    /**
     * DataGrid
     */
    DataGrid dataGrid(Map<String, Object> params, int pageNo, int pageSize);
}
